<?php defined('BASEPATH') or exit('No direct script access allowed');

class Module_Site_setting extends Module {

	public $version = 1.0;

	public function info()
	{
		return array(
			'name' => array(
				'es' => 'Site settings es',
				'en' => 'Site settings'
			),
			'description' => array(
				'es' => 'Escort Site settings',
				'en' => 'Escort Site settings'
				),
			'frontend' => TRUE,
			'backend' => TRUE,
			'skip_xss'	=> TRUE,
			'menu'		=> 'content',
		);
	}

	public function install()
	{
		$this->db->query("
			CREATE  TABLE IF NOT EXISTS ".$this->db->dbprefix('escort_site_settings')." (
  				 `site_id` INT NOT NULL ,
				  `main_site_language_id` INT NULL ,
				  `escort_category_code` INT NULL ,
				  `sexual_orientation_code` INT NULL ,
				  `escort_priority_id` INT NULL ,
				  `min_price_per_hour` FLOAT NULL ,
				  `max_price_per_hour` FLOAT NULL ,
				  `hair_color_code` INT NULL ,
				  `hair_size_code` INT NULL ,
				  `hair_style_code` INT NULL ,
				  `eye_code` INT NULL ,
				  `height` FLOAT NULL ,
				  `weight` FLOAT NULL ,
				  `measure_1` FLOAT NULL ,
				  `measure_2` FLOAT NULL ,
				  `measure_3` FLOAT NULL ,
			  PRIMARY KEY (`site_id`)
			) ENGINE=InnoDB DEFAULT CHARSET=utf8
		");
		return $this->db->query("
			CREATE  TABLE IF NOT EXISTS ".$this->db->dbprefix('escort_site_settings_on_zones')." (	
			  `site_id` INT NOT NULL ,			
			  `country_id` INT NULL ,			
			  `region_id` INT NULL ,			
			  `province_id` INT NULL ,			
			  `city_id` INT NULL )
			ENGINE=InnoDB DEFAULT CHARSET=utf8
		");
	}

	public function uninstall()
	{
		return TRUE;
	}

	public function upgrade($old_version)
	{
		// Your Upgrade Logic
		return TRUE;
	}

	public function help()
	{
		// Return a string containing help info
		// You could include a file and return it here.
		return "This module has no inline docs as it does not have a back-end.";
	}
}
/* End of file details.php */